package com.aspose.cells;

class zbtc {
   private com.aspose.cells.b.a.b.zj a;
   private int b = 0;
   private boolean c = false;
   private double d;
   private double e;
   private double f;
   private double g;
   private int h = 7;
   private int i = 0;
   private int j = 0;
   private double k;
   private double l;
   private double m;
   private double n;
   private double o = 1.0D;

   public void a(com.aspose.cells.b.a.b.zj var1) {
      this.a = var1;
   }

   public void a(boolean var1) {
      this.c = var1;
   }

   public void a(double var1) {
      this.d = this.a(var1, -2112.0D, 2112.0D);
   }

   public void b(double var1) {
      this.e = this.a(var1, -2112.0D, 2112.0D);
   }

   public void c(double var1) {
      this.f = this.a(var1, 0.0D, 100.0D);
   }

   public void d(double var1) {
      this.g = this.a(var1, 0.0D, 100.0D);
   }

   public void a(int var1) {
      this.h = var1;
   }

   public void b(int var1) {
      this.i = var1;
   }

   public void c(int var1) {
      this.j = var1;
   }

   public double a() {
      return this.k;
   }

   public void e(double var1) {
      this.k = this.a(var1, -100.0D, 100.0D);
   }

   public double b() {
      return this.l;
   }

   public void f(double var1) {
      this.l = this.a(var1, -100.0D, 100.0D);
   }

   public double c() {
      return this.m;
   }

   public void g(double var1) {
      this.m = this.a(var1, -100.0D, 100.0D);
   }

   public double d() {
      return this.n;
   }

   public void h(double var1) {
      this.n = this.a(var1, -100.0D, 100.0D);
   }

   private double a(double var1, double var3, double var5) {
      if (var1 < var3) {
         return var3;
      } else {
         return var1 > var5 ? var5 : var1;
      }
   }

   public void i(double var1) {
      if (var1 < 0.0D) {
         this.o = 0.0D;
      }

      if (var1 > 1.0E9D) {
         this.o = 1.0E9D;
      }

      this.o = var1;
   }

   com.aspose.cells.b.a.b.zc a(com.aspose.cells.b.a.b.a.ze var1, float var2) {
      if (this.b == 0 && var2 != 1.0F) {
         ;
      }

      com.aspose.cells.b.a.b.zq var3;
      float var6;
      float var7;
      if (this.c) {
         var3 = com.aspose.cells.a.c.zn.a(var1);
         com.aspose.cells.b.a.b.zx var13 = new com.aspose.cells.b.a.b.zx(this.a, 0, var3.f(), var3.g(), var3.h(), var3.i());
         com.aspose.cells.b.a.b.a.zi var14 = new com.aspose.cells.b.a.b.a.zi();
         var6 = var3.f();
         var7 = var3.g();
         var6 = zbuk.a(var6);
         var7 = zbuk.a(var7);
         var14.b(var6, var7);
         var13.b(var14);
         return var13;
      } else {
         var3 = com.aspose.cells.a.c.zn.a(var1);
         com.aspose.cells.b.a.b.za var4 = new com.aspose.cells.b.a.b.za((int)var3.h(), (int)var3.i());
         com.aspose.cells.b.a.b.zi var5 = com.aspose.cells.b.a.b.zi.a((com.aspose.cells.b.a.b.zj)var4);
         var6 = (float)((double)var4.i() * this.a() / 100.0D);
         var7 = (float)((double)var4.h() * this.c() / 100.0D);
         float var8 = (float)var4.i() - (float)((double)var4.i() * this.b() / 100.0D);
         float var9 = (float)var4.h() - (float)((double)var4.h() * this.d() / 100.0D);
         com.aspose.cells.b.a.b.zq var10 = new com.aspose.cells.b.a.b.zq(var6, var7, var8 - var6, var9 - var7);
         com.aspose.cells.b.a.b.zq var11 = new com.aspose.cells.b.a.b.zq(0.0F, 0.0F, (float)this.a.i(), (float)this.a.h());
         var5.a(this.a, (com.aspose.cells.b.a.b.zq)var10, (com.aspose.cells.b.a.b.zq)var11, 2);
         com.aspose.cells.b.a.b.zx var12 = null;
         if (this.a() == 0.0D && this.c() == 0.0D && this.n == 0.0D && this.l == 0.0D) {
            var12 = new com.aspose.cells.b.a.b.zx(this.a, var3);
         } else {
            var12 = new com.aspose.cells.b.a.b.zx(var4, var3);
         }

         return var12;
      }
   }
}
